package com.fangcun.common.enums;

/**
 * @作者： 丶CHEN @时间： 2018年6月28日 - 上午10:04:26 @description：->
 */
public enum OrderStatusEnum {

	/** 主订单状态 **/
	MAIN_ORDER_STATUS_1(1, "待支付"),
	MAIN_ORDER_STATUS_2(2, "已支付"),
	MAIN_ORDER_STATUS_3(3, "已发货"),
	MAIN_ORDER_STATUS_4(4, "已收货"),
	MAIN_ORDER_STATUS_5(5, "已取消"),

	/** 退款订单状态 **/
	REFUND_ORDER_STATUS_7(7, "已申请退货"),
	REFUND_ORDER_STATUS_8(8, "退货快递中"),
	REFUND_ORDER_STATUS_9(9, "退货成功"),
	REFUND_ORDER_STATUS_10(10, "退货失败"),

	/** 分润订单状态 **/
	RESERVE_ORDER_STATUS_1(1, "已预约"),
	RESERVE_ORDER_STATUS_2(2, "已使用"),
	RESERVE_ORDER_STATUS_3(3, "已作废"),
	RESERVE_ORDER_STATUS_4(4, "已离开");

	private Integer status;

	private String msg;

	private OrderStatusEnum(Integer status, String msg) {
		this.status = status;
		this.msg = msg;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public static String orderStatusVaule(Integer status) {
		String value = null;
		if (MAIN_ORDER_STATUS_1.getStatus().equals(status)) {
			value = MAIN_ORDER_STATUS_1.getMsg();
		}
		if (MAIN_ORDER_STATUS_2.getStatus().equals(status)) {
			value = MAIN_ORDER_STATUS_2.getMsg();
		}
		if (MAIN_ORDER_STATUS_3.getStatus().equals(status)) {
			value = MAIN_ORDER_STATUS_3.getMsg();
		}
		if (MAIN_ORDER_STATUS_4.getStatus().equals(status)) {
			value = MAIN_ORDER_STATUS_4.getMsg();
		}
		if (MAIN_ORDER_STATUS_5.getStatus().equals(status)) {
			value = MAIN_ORDER_STATUS_5.getMsg();
		}
		if (REFUND_ORDER_STATUS_7.getStatus().equals(status)) {
			value = REFUND_ORDER_STATUS_7.getMsg();
		}
		if (REFUND_ORDER_STATUS_8.getStatus().equals(status)) {
			value = REFUND_ORDER_STATUS_8.getMsg();
		}
		if (REFUND_ORDER_STATUS_9.getStatus().equals(status)) {
			value = REFUND_ORDER_STATUS_9.getMsg();
		}
		if (REFUND_ORDER_STATUS_10.getStatus().equals(status)) {
			value = REFUND_ORDER_STATUS_10.getMsg();
		}
		return value;
	}

}
